home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t9.d64
/
sprite data.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
132 lines
0 GOTO 63010
60000 END
60004 REM SPRITE DATA GENERATOR
60006 REM
60008 REM 1. RUN THIS PROGRAM
60010 REM 2. AFTER INITIALIZING DATA,
60012 REM THE PGM WILL ASK FOR THE
60014 REM 1ST STATEMENT NO. FOR
60016 REM THE SPRITE DATA STATEMENT
60018 REM 3. USE CRSR.UP
60020 REM CRSR.DN
60022 REM CRSR.LEFT
60024 REM CRSR.RIGHT
60026 REM RETURN
60028 REM 4. USE SPACE BAR TO SET A
60030 REM SPRITE POINT
60032 REM 5. USE . TO ERASE A SPRITE
60034 REM POINT
60036 REM 6. WHEN FINISH EDITING,
60038 REM PRESS F1 TO GENERATE
60040 REM BASIC DATA STATEMENTS
60042 REM THAT MAY BE USED IN A
60044 REM USER SPRITE PROGRAM
60046 REM 7. POSITION THE CURSOR
60048 REM UNDER EACH STATEMENT
60050 REM AND ENTER IT TO THE
60052 REM PROGRAM
60054 REM 8. RUN THE PROGRAM AGAIN
60056 REM TO GENERATE ANOTHER
60058 REM SET OF SPRITE DATA
60060 REM 9. WHEN ALL SPRITE EDITING
60062 REM IS COMPLETED, DELETE
60064 REM STATEMENETS 60000-63400
60066 REM AND STATEMENT 0 TO MAKE
60068 REM ROOM FOR USER PROGRAM
60070 REM 10. IF MEMORY SPACE IS NOT
60072 REM A CONCERN, JUST DELETE
60074 REM STATEMENT 0 TO RUN USER
60076 REM PROGRAM. IF THERE IS
60078 REM NEED TO RE-EDIT SPRITE
60080 REM SIMPLY ADD STATEMENT
60082 REM 0 GOTO 63010
60084 REM AND RUN TO ENTER SPRITE
60086 REM EDITING MODE AGAIN.
60088 REM 11. THIS PROGRAM TAKES ABOUT
60090 REM 4K OF MEMORY.
60092 REM
60094 REM HAPPY SPRITING !!!
60096 REM
60098 REM
60100 REM
60102 REM
63010 DIM SDA%(3,21),SCN%(24,21)
63015 PRINT "[144][147]PLEASE WAIT...INITIALIZING DATA"
63020 POKE 53280,6:POKE 53281,10
63025 FOR J=1TO21
63030 FOR I=1TO3
63035 N=(J-1)*3+I-1
63040 POKE 832+N,0 : SDA%(I,J)=0
63045 FOR K=1TO8:K1=(I-1)*8+K:SCN%(K1,J)=0:NEXT K
63050 NEXT I: NEXT J
63055 V=53248 :POKE 53289,6
63060 POKE V+4,30 :POKE V+5,80:POKE 53264,4:POKE 53277,4:POKE 53271,4
63065 POKE V+21,4 : POKE 2042,13
63070 PRINT"[147]1ST STATEMENT # (1-59999)";:INPUT SN%
63075 IF SN%<1 OR SN%>59999 GOTO 63070
63080 PRINT"[147] I------II------II------I"
63085 FOR I=1TO21
63090 PRINT" ........................ "I
63095 NEXT I
63100 PRINT"EDIT SCREEN,PRESS F1[146] WHEN FINISHED ";
63105 X=1:Y=1:PRINT""SPC(3);
63110 TH$="[211]"
63115 IF SCN%(X,Y)=0 THEN TH$="."
63120 PRINT"C[157]";
63125 GET A$ :IF A$="" THEN GOTO 63125
63130 PRINT TH$"[157]";
63135 IF A$=CHR$(133) GOTO 63355:REM F1
63140 IF A$=CHR$( 13) GOTO 63180:REM RN
63145 IF A$=CHR$(145) GOTO 63205:REM UP
63150 IF A$=CHR$( 17) GOTO 63215:REM DN
63155 IF A$=CHR$( 29) GOTO 63225:REM RT
63160 IF A$=CHR$(157) GOTO 63235:REM LF
63165 IF A$=CHR$( 32) GOTO 63260:REM SP
63170 IF A$=CHR$( 46) GOTO 63245:REM .
63175 GOTO 63120
63180 IF Y=21 GOTO 63190
63185 Y=Y+1 : PRINT "";
63190 IF X=1 GOTO 63110
63195 I=X-1:FOR J=ITO1STEP-1:PRINT"[157]";
63200 X=X-1: NEXT J : GOTO 63110
63205 IF Y=1 GOTO 63110
63210 Y=Y-1: PRINT"[145]";: GOTO 63110
63215 IF Y=21 GOTO 63110
63220 Y=Y+1: PRINT"";: GOTO 63110
63225 IF X=24 GOTO 63110
63230 X=X+1: PRINT"";:GOTO 63110
63235 IF X=1 GOTO 63110
63240 X=X-1: PRINT"[157]";: GOTO 63110
63245 PRINT".[157]"; : ES=1
63250 SCN%(X,Y)=0
63255 GOTO 63270
63260 PRINT "[211][157]";: ES=2
63265 SCN%(X,Y)=1
63270 IF X>16 GOTO 63290
63275 IF X>8 GOTO 63285
63280 X1%=1 : X3%=X : GOTO 63295
63285 X1%=2 : X3%=X-8 : GOTO 63295
63290 X1%=3 : X3%=X-16 : GOTO 63295
63295 N=(Y-1)*3+X1%-1+832
63300 X2%=2^(8-X3%)
63305 IF ES=2 GOTO 63330
63310 X2%=NOT(X2%)
63315 SDA%(X1%,Y)=SDA%(X1%,Y) AND X2%
63320 POKE(N),PEEK(N) AND X2%
63325 GOTO 63340
63330 SDA%(X1%,Y)=SDA%(X1%,Y) OR X2%
63335 POKE(N),PEEK(N) OR X2%
63340 IF X<>24 GOTO 63230:REM X NOT=24
63345 IFY<>21 GOTO63180:REM AND NOT=21
63350 GOTO 63105
63355 PRINT"[147]";:POKE 53269,0
63360 FOR I=1TO19 STEP 2
63365 J=I+1
63370 PRINT SN%"DATA"SDA%(1,I)","SDA%(2,I)","SDA%(3,I)",";
63375 PRINT SDA%(1,J)","SDA%(2,J)","SDA%(3,J)
63380 SN%=SN%+10
63385 NEXT I
63390 PRINT SN%"DATA"SDA%(1,21)","SDA%(2,21)","SDA%(3,21)
63395 PRINT " ENTER THE DATA STATMENTS INTO YOUR PROGRAM"
63400 PRINT" RUN THE PROGRAM AGAIN TO EDIT ANOTHER SPRITE"